package com.bdqn.vueboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 会务安排
 * @TableName arrangement
 */
@TableName(value ="arrangement")
@Data
public class Arrangement implements Serializable {
    /**
     * 会务id
     */
    @TableId(type = IdType.AUTO)
    private Integer arrangementId;

    /**
     * 会务人员
     */
    private String arrangementName;

    /**
     * 职位
     */
    private String arrangementPosition;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long creationId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    /**
     * 修改者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateId;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Arrangement other = (Arrangement) that;
        return (this.getArrangementId() == null ? other.getArrangementId() == null : this.getArrangementId().equals(other.getArrangementId()))
            && (this.getArrangementName() == null ? other.getArrangementName() == null : this.getArrangementName().equals(other.getArrangementName()))
            && (this.getArrangementPosition() == null ? other.getArrangementPosition() == null : this.getArrangementPosition().equals(other.getArrangementPosition()))
            && (this.getCreationId() == null ? other.getCreationId() == null : this.getCreationId().equals(other.getCreationId()))
            && (this.getCreationTime() == null ? other.getCreationTime() == null : this.getCreationTime().equals(other.getCreationTime()))
            && (this.getUpdateId() == null ? other.getUpdateId() == null : this.getUpdateId().equals(other.getUpdateId()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getArrangementId() == null) ? 0 : getArrangementId().hashCode());
        result = prime * result + ((getArrangementName() == null) ? 0 : getArrangementName().hashCode());
        result = prime * result + ((getArrangementPosition() == null) ? 0 : getArrangementPosition().hashCode());
        result = prime * result + ((getCreationId() == null) ? 0 : getCreationId().hashCode());
        result = prime * result + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
        result = prime * result + ((getUpdateId() == null) ? 0 : getUpdateId().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", arrangementId=").append(arrangementId);
        sb.append(", arrangementName=").append(arrangementName);
        sb.append(", arrangementPosition=").append(arrangementPosition);
        sb.append(", creationId=").append(creationId);
        sb.append(", creationTime=").append(creationTime);
        sb.append(", updateId=").append(updateId);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
